package com.qcby.service;

import com.qcby.entity.PersonalFavoritesFolder;
import com.qcby.entity.Result;
import com.qcby.entity.Shop;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PersonalCollectionService {
    Result<Integer> getUserIdByName(String username);

    Result<List<PersonalFavoritesFolder>> selectFavoritesList(Integer u_id,Integer fatherFolderId);

    Result<List<Shop>> selectFavoriteShop(int u_id,int folderId);

    Result<PersonalFavoritesFolder> createFolder(PersonalFavoritesFolder folderInfo);
    Result<Integer> collection(
            @Param("userId") Integer userId,
            @Param("shopId") Integer shopId,
            @Param("reason") String reason,
            @Param("folderId") Integer folderId
    );

    Result<Integer> deleteFolder(int shopId ,int u_id, int folderId);

    Result<Integer> recollecteFolder(int shopId ,int u_id, int folderId);

    Result<List<PersonalFavoritesFolder>> updateShopCountInFolder(Integer userId, Integer fatherId);
}
